Managed Assertions for Component Contracts
نویسندگان
چکیده
Behavioral specifications in interface contracts are important measures for improving quality of software components. Binary components of different language origins need a common understanding of behavioral contracts to work effectively in component-based systems. We propose a system by which behavioral specifications in the spirit of Design by Contract can accompany binary components and be available at runtime to enable flexible and correct treatment, in a language neutral manner. Behavioral contracts written in different specification notations, for components written in different programming languages, have common runtime semantics. Runtime monitoring is correct with regards to behavioral subtyping, object re-entrance and exception handling. The mechanism also enables runtime reflection of contract constructs. We show our design for this system, as an extension to the Common Language Infrastructure (CLI) standardized by ECMA. We also describe our prototype implementation based on Microsoft’s Shared Source CLI.
منابع مشابه
Using Assertions to Enhance the Correctness of Kmelia Components and their Assemblies
The Kmelia component model is an abstract formal component model based on services. It is dedicated to the speci cation and development of correct components. This work enriches the Kmelia language to allow the description of data, expressions and assertions when specifying components and services. The objective is to enable the use of assertions in Kmelia in order to support expressive service...
متن کاملObject-oriented Programming Languages Need Well-founded Contracts
Over the past few years, the notion of building software from components has become popular again. The goal is to produce systems by adapting and linking off-the-shelf modules from a pool of interchangeable components. To turn this idea into reality, the formal descriptions of software components need to specify more than the type signatures of their exported services. At a minimum, they should...
متن کاملBehavioral Interface Contracts for Java (Rice University CS TR00-366)
Programs should consist of off-the-shelf, interchangeable, black-box components that are produced by a network of independent software companies. These components should not only come with type signatures but also with contracts that describe other aspects of their behavior. One way to express contracts is to state preand postconditions for externally visible functions. These preand post-condit...
متن کاملDesign by Contract Using Meta-Assertions
The important role that class contracts Ð pre and post-conditions of methods, and invariants Ð play in the specification, monitoring and reuse of classes is becoming increasingly accepted by the OO community. The several languages of assertions and monitoring code generation tools that exist allow the specification and, eventually, the runtime checking of very powerful and elegant contracts. Th...
متن کاملVers la négociation de contrats dans les composants logiciels hiérarchiques
The contractual approach turns out to be well-suited to specification and verification needs in component-based software systems. However, contracts are frequently challenged by dynamic re-configurations and fluctuations of non functional aspects. To solve this problem, we propose, in this article, a first negotiation model which aims at automatically restoring the validity of contracts. We als...
متن کامل